Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landing page's card components #369

Merged
merged 43 commits into from
May 7, 2024
Merged

Landing page's card components #369

merged 43 commits into from
May 7, 2024

Conversation

kpyszkowski
Copy link
Contributor

@kpyszkowski kpyszkowski commented Apr 17, 2024

Ref: #355

Goal:

To implement Landing page's card components

Features:

  • IconCard component
  • ValueCard component
  • ContentCard component

localhost_5173_ (1)

Image assets will be replaced with SVGs
@kpyszkowski kpyszkowski self-assigned this Apr 17, 2024
@kpyszkowski kpyszkowski marked this pull request as draft April 17, 2024 18:32
Copy link

netlify bot commented Apr 17, 2024

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit 32b5b79
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp-testnet/deploys/662015bbe49ce40008eefdfe
😎 Deploy Preview https://deploy-preview-369--acre-dapp-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kpyszkowski kpyszkowski changed the base branch from main to landing-page April 18, 2024 12:08
@kpyszkowski kpyszkowski marked this pull request as ready for review April 19, 2024 12:03
dapp/src/assets/images/card-icon-boost-arrow.png Outdated Show resolved Hide resolved
dapp/src/constants/externalHref.ts Show resolved Hide resolved
dapp/src/pages/LandingPage/CardButton.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/IconCard.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/TVLCard.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/TVLCard.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/index.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/index.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@kkosiorowska kkosiorowska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a few comments. I would also like to point out that in my case, the app does not display well. In addition, when you make the window smaller the elements are broken. Just flagging.

Screenshot 2024-05-01 at 11 57 31
Screen.Recording.2024-05-01.at.11.56.50.mov

dapp/src/theme/Card.ts Show resolved Hide resolved
dapp/src/pages/LandingPage/index.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/index.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/index.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/TVLCard.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/IconCard.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/ValueCard.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/ValueCard.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/ValueCard.tsx Outdated Show resolved Hide resolved
)
}

const ValueCard = Object.assign(ValueCardBase, { FooterItem: Box })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I was confused for a first moment too. 😅 I would also prefer a chakra pattern to make the project consistent. I wonder more if we really need it. Note that ValueCard.FooterItem is simply a component Box without any additional styles. Using it with CurrencyBalance adds a non-necessary div. But I am fine with leaving it as it is.

Screenshot 2024-05-01 at 11 26 55

@nkuba nkuba mentioned this pull request May 3, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right. This button uses the card variant. The only thing this component does is add some additional styles. The name CardButton used here makes it look like a shared component. That's why I'm thinking about changing the name or maybe moving it to shared components. At the moment we don't have a style guide so it's difficult to make decisions. So we can leave it as is and then update it later. Just flagging the issue.

dapp/src/pages/LandingPage/index.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/index.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/index.tsx Outdated Show resolved Hide resolved
dapp/src/pages/LandingPage/IconCard.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@kkosiorowska kkosiorowska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left non-blocking comments. Please resolve conflicts and let me know if you want to improve anything else.

`IconCard` to `BenefitCard`
Used `children` prop instead, added style currency balance child
component, update names for consistency
@kpyszkowski kpyszkowski requested a review from kkosiorowska May 6, 2024 12:27
Copy link
Contributor

@kkosiorowska kkosiorowska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left non-blocking comments. Let's merge it. 🚢

@@ -13,9 +13,10 @@ export type CurrencyBalanceProps = {
shouldBeFormatted?: boolean
desiredDecimals?: number
size?: string
variant?: "greater-balance-xl" | "greater-balance-xxl"
variant?: "greater-balance-xl" | "greater-balance-xxl" | "unstyled"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we don't use this variant anywhere.

Suggested change
variant?: "greater-balance-xl" | "greater-balance-xxl" | "unstyled"
variant?: "greater-balance-xl" | "greater-balance-xxl"

ImageProps,
} from "@chakra-ui/react"

type IconCardProps = CardProps & {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type IconCardProps = CardProps & {
type BenefitCardProps = CardProps & {

@kkosiorowska kkosiorowska merged commit 9d91828 into landing-page May 7, 2024
6 checks passed
@kkosiorowska kkosiorowska deleted the landing-cards branch May 7, 2024 05:43
kkosiorowska added a commit that referenced this pull request May 9, 2024
Closes: #363 

## Goal:
To implement Landing Page
This PR aggregates all component PRs to finally complete the
implementation of landing page

## Component PRs:
The list of PRs is given in the issue's description. Each component PR
merges to this PR.

- #357
- #358
- #364
- #368
- #369

## Designs:
<img width="1205" alt="image"
src="https://github.com/thesis/acre/assets/11503879/be6b6ed2-a808-483e-9daf-43d2c042cba4">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants